<?php
require_once('Extension/View/Helper/Abstract.php');

require_once('Extension/Locale.php');

class Extension_View_Helper_T extends Extension_View_Helper_Abstract
{
    public function T($string, $fromTranslationList = false, $type = Extension_Locale::LANGUAGE)
    {
        if ($fromTranslationList) {
            return Extension_Locale::getTranslation($string, $type, Kbs::initLocale());
        } else {
            return $this->view->translate($string);
        }
    }
}